import zrender from 'zrender/zrender'
import Rose from 'zrender/graphic/shape/Rose'

export default {
  mounted() {
    let zr = zrender.init(this.$refs.chart)
    let shape = new Rose({
      shape: {
        x : 300,
        y : 100,
        r : [35],
        k : 7,
        n : 4,

      },

      style: {
        stroke: '#fcc',
        lineWidth : 2,
        textPosition :'inside'
      },

      draggable: true
    })
    zr.add(shape)
  },

  render(h) {
    return (
      <div class="page">
        <div ref="chart" style="width: 100%; height: 600px"></div>
      </div>
    )
  }
}
